<template>
	<u-popup :show="reminderShow" @close="reminderShow = false" :safeAreaInsetBottom="false" mode="center" round="24rpx"
		closeable closeOnClickOverlay @touchmove.stop.prevent="moveHandle">
		<view
			:class="['prompt u-flex-col u-flex-center',enterprises_auth_apply == 0?'prompt-shzqy':enterprises_auth_apply == 2?'prompt-wtg':'']">
			<view class="header">
				<image class="header-img"
					:src="$getImageUrl(enterprises_auth_apply == 0?'/user_client/image/shzqy.png':enterprises_auth_apply == 2?'/user_client/image/wtg.png':'/user_client/image/xzqy.png')"
					mode=""></image>
			</view>
			<view class="prompt-text">
				{{enterprises_auth_apply == 0?'您提交的企业认证信息正在审核，请耐心等待':enterprises_auth_apply == 2?'您提交的企业认证信息未通过，请前往修改':'当前商品限企业购买，是否前往企业认证？'}}
			</view>
			<view class="prompt-button u-flex-center">
				<view
					:class="['button',enterprises_auth_apply == 0?'button-shzqy':enterprises_auth_apply == 2?'button-wtg':'']"
					@click="reminderChange">好的</view>
			</view>
		</view>
	</u-popup>
</template>

<script>
	import {
		mapState
	} from 'vuex'
	export default {
		data() {
			return {
				reminderShow: false
			}
		},
		computed: {
			...mapState({
				enterprises_auth_apply: state => state.init.enterprises_auth_apply,
			})
		},
		methods: {
			reminderChange() {
				if (this.enterprises_auth_apply == -1 || this.enterprises_auth_apply == 2) {
					this.$navigateTo('/apparatusSubPackages/index/index?tabbarIndex=3')
				}
				this.reminderShow = false
			},
			moveHandle() {
				console.log('禁止滚动')
			}
		}
	}
</script>

<style lang="scss" scoped>
	.prompt-wtg {
		background: linear-gradient(180deg, #FFDEDE 0%, #FFFFFF 100%) !important;
	}

	.prompt-shzqy {
		background: linear-gradient(180deg, #FFF3CB 0%, #FFFFFF 100%) !important;
	}

	.prompt {
		width: 510rpx;
		padding: 34rpx 86rpx;
		box-sizing: border-box;
		background: linear-gradient(180deg, #B2D3FF 0%, #FFFFFF 100%);
		border-radius: 28rpx;

		.header {
			.header-img {
				width: 234rpx;
				height: 234rpx;
				display: block;
			}
		}

		.prompt-text {
			font-size: 28rpx;
			line-height: 1.5;
			padding-top: 30rpx;
		}

		.prompt-button {
			padding-top: 40rpx;

			.button-wtg {
				color: #CC242B !important;
				border: 2rpx solid #CC242B !important;
			}

			.button-shzqy {
				color: #E59216 !important;
				border: 2rpx solid #EAA846 !important;
			}

			.button {
				width: 260rpx;
				height: 72rpx;
				background-color: #FFFFFF;
				border-radius: 12rpx;
				border: 2rpx solid #328D65;
				font-size: 28rpx;
				color: #328D65;
				text-align: center;
				line-height: 72rpx;
			}
		}
	}
</style>